<style lang="less">
	.article {
		font-size: 16px;
		font-weight: 400;
		margin: 12px 0;
	}

	code {
		display: inline-block;
		background: #f7f7f7;
		font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;
		margin: 0 3px;
		padding: 1px 5px;
		border-radius: 3px;
		color: #666;
		border: 1px solid #eee;
	}
</style>
<template>
	<div class="editor">
		<Row style="min-width:780px">
			<Card>
				<Form ref="formCn" :model="formCn" :label-width="60">

					<Form-item label="内容详情" prop="content">
						<quill-editor v-model.trim="formCn.content" ref="myQuillEditorCn" :options="editorOption" @blur="onEditorBlur($event)"
						 @focus="onEditorFocus($event)" @ready="onEditorReady($event)">
						</quill-editor>
					</Form-item>
					<Button @click="submitCn" type="primary">提交</Button>
				</Form>
			</Card>

		</Row>
	</div>
</template>

<script>
	import {
		getStandCn,
		updateStandCn,
	} from "@/api/index";
	import {
		editorOption
	} from "@/api/quill";
	export default {
		name: "stand-describe",
		data() {
			return {
				formCn: {
					content: '',
				},
				editorOption: editorOption
			};
		},
		methods: {
			init() {
				getStandCn().then(res => {
					if (res.success == true && res.result) {
						this.formCn.content = res.result.content;
					}

				});
			},
			submitCn() {
				updateStandCn({
					content: this.formCn.content
				}).then(res => {
					if (res.success == true) {
						this.$Message.success('提交成功');
					}
				});
			},
			onEditorBlur(quill) {
			},
			onEditorFocus(quill) {
			},
			onEditorReady(quill) {
			},
		},
		mounted() {
			this.init();


		}
	};
</script>
